3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides routines that you can use to add a vector to a point or subtract a vector from a point. For increased floating-point precision, it is better to use the vector-point subtraction routines than to reverse a vector and then add it to a point.
You can use the Q3Point2D_Vector2D_Add function to add a two-dimensional vector to a two-dimensional point.
TQ3Point2D *Q3Point2D_Vector2D_Add (
const TQ3Point2D *point2D,
const TQ3Vector2D *vector2D,
TQ3Point2D *result);
You can use the Q3Param2D_Vector2D_Add function to add a two-dimensional vector to a two-dimensional parametric point.
TQ3Param2D *Q3Param2D_Vector2D_Add (
const TQ3Param2D *param2D,
const TQ3Vector2D *vector2D,
TQ3Param2D *result);
You can use the Q3Point3D_Vector3D_Add function to add a three-dimensional vector to a three-dimensional point.
TQ3Point3D *Q3Point3D_Vector3D_Add (
const TQ3Point3D *point3D,
const TQ3Vector3D *vector3D,
TQ3Point3D *result);
You can use the Q3Point2D_Vector2D_Subtract function to subtract a two-dimensional vector from a two-dimensional point.
TQ3Point2D *Q3Point2D_Vector2D_Subtract (
const TQ3Point2D *point2D,
const TQ3Vector2D *vector2D,
TQ3Point2D *result);
You can use the Q3Param2D_Vector2D_Subtract function to subtract a two-dimensional vector from a two-dimensional parametric point.
TQ3Param2D *Q3Param2D_Vector2D_Subtract (
const TQ3Param2D *param2D,
const TQ3Vector2D *vector2D,
TQ3Param2D *result);
You can use the Q3Point3D_Vector3D_Subtract function to subtract a three-dimensional vector from a three-dimensional point.
TQ3Point3D *Q3Point3D_Vector3D_Subtract (
const TQ3Point3D *point3D,
const TQ3Vector3D *vector3D,
TQ3Point3D *result);
Previous | QD3D Book | Overview | Chapter Contents | Next |